package com.kh.statistics.video.core;

import com.alibaba.excel.EasyExcel;

import java.io.OutputStream;
import java.util.List;

/**
 * @ClassName ExcelExport
 * @Description TODO
 * @Author konghong1
 * @Date 2024/5/8 21:07
 * @Version 1.0
 **/
public class ExcelExport {
    public static <T> void export(OutputStream outputStream, String sheetName, List<T> list, Class<T> clazz) {
        EasyExcel.write(outputStream)
                .head(clazz)
                .sheet(sheetName)
                .doWrite(list);
    }
}
